<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" import="com.ckeditor.CKEditorConfig"%>
<html>
<head>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor"%>
<%@ include file="/jsp/include/header.jsp"%>
<%
	CKEditorConfig config2 = new CKEditorConfig();
	config2.addConfigValue("toolbar","[['Bold', 'Italic','Underline','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock']]");
	config2.addConfigValue("height", 150);
	config2.addConfigValue("width", 600);
	config2.addConfigValue("toolbarCanCollapse", false);
%>
<script type="text/javascript" charset="UTF-8">
	var contactId="${param.contactId}";
	var form1;
	 
	$(function() {
		form1 = $('#form1').form({
			onLoadSuccess:function(data){
				if('${userRoleInfo.role_id}'!='1'&&form1.find('[name=owner]').val()!='${userRoleInfo.ur_id}')
					$("#toolbar a:eq(0)").linkbutton('disable');
				var oEditor = CKEDITOR.instances.contact_desc;
				var value = $("textarea[name=contact_desc]").val();
				oEditor.setData(value);
			}
			
		});
		form1.form('load','<%=ctx%>/demand/contact/get.htm?id='+contactId);
		
	});
</script>
</head>
<body >
	<div class="easyui-panel"   title="需求查看"  data-options="iconCls:'icon-save'">
	
		<form id="form1" method="post">
			 <input name="contact_id" type="hidden" />
			 <input name="data" type="hidden" />
			 <input name="state" type="hidden" />
			 <input name="owner" type="hidden" />
			 <table class="tableForm">
			     <tr>
	 				<td style="width:70px;" >需求编号：</td>
				    <td style="width:180px;" title="系统自动生成">    
					<input name="contact_num" readonly="readonly" style="background-color:khaki" />
				    </td>
				   
					<td style="width:70px;" >需求类型：</td>
				    <td style="width:180px;">
				    <input name="contact_type1_" readonly="readonly"  />
				 
				    </td>
					<td style="width:70px;" >是否合同内：</td>
				    <td style="width:180px;">    
				    <input name="contact_type2_" readonly="readonly"  />
				    </td>
			     </tr>
			    
			     <tr>
		 			<td style="width:70px;" >需求标题：</td>
				    <td style="width:180px;">    
				    <input name="contact_title" readonly="readonly"  />
				    </td>
				   	  <td style="width:70px;" >IT网管需求编码：</td>
				    <td style="width:180px;">    
				    <input name="contact_code" readonly="readonly"  />
				    </td>
					 <td style="width:70px;" >需求来源：</td>
				    <td style="width:180px;">    
					<input name="contact_from"  />
				    </td>
				 </tr>
				 <tr>
		 
				   <td style="width:70px;" >所属系统：</td>
				   <td style="width:180px;">
				   <input name="sys_id_" readonly="readonly"  />
				    </td>
	
					<td style="width:70px;" >需求登记时间：</td>
				    <td style="width:180px;">    
				     <input name="record_date" readonly="readonly"  />
				    </td>
					
				   <td style="width:70px;" >计划完成时间：</td>
				    <td style="width:180px;">    
				     <input name="plan_date" readonly="readonly"  />
				    </td>
			     </tr>
				 <tr>
		 
				   <td style="width:70px;" >状态：</td>
				   <td style="width:180px;">
				   <input name="state_" readonly="readonly"  />
				    </td>
				   <td style="width:70px;" >实际完成时间：</td>
				    <td style="width:180px;">    
				     <input name="finished_date" readonly="readonly"  />
				    </td>
			     </tr>
			     <tr>
				   <td style="width:70px;" >需求月份：</td>
				    <td style="width:180px;">    
				    <input name="plan_month" readonly="readonly"  />
				    </td>
					<td style="width:70px;" >需求负责人：</td>
				    <td style="width:180px;">
				    <input name="owner_" readonly="readonly"  />
				    </td>
					<td style="width:70px;" >工作量 人工/日：</td>
				    <td style="width:180px;">    
				     <input name="work_day" readonly="readonly"  />
				    </td>
				  </tr>
				  <tr>
				    
				   <td style="width:70px;" >需求描述：</td>
				    <td  colspan="5" >
					<textarea name="contact_desc" cols="60" rows="10" readonly="readonly"  ></textarea>
					 <ckeditor:replace replace="contact_desc"  config="<%=config2 %>"  basePath="${pageScope.ctx}/ckeditor/"/>
				    </td>
				 
			     </tr>
			      
	      </table>
	  </form>
	</div>
	<br>
	<div class="easyui-tabs"   style="height:550px" >
			<div title="任务配置"  data-options="href:'<%=ctx%>/jsp/demand/taskCfg.jsp?contactId=${param.contactId}'" >
			</div>
			<div title="会议配置"  data-options="href:'<%=ctx%>/jsp/demand/meetingCfg.jsp?contactId=${param.contactId}'" > 
			</div>
	 
	</div>
 <%-- 任务表单--%>
 
	 <div id="d1" style="display: none;overflow: hidden;">
		<form id="f1" method="post">
		 <input name="task_id" type="hidden" />
		 <input name="contact_id" type="hidden" />
		 <input name="data" type="hidden" />
		 <table class="tableForm">
		     <tr>
			   <td style="width:70px;" >任务名称：</td>
			    <td style="width:150px;">
				<input class="easyui-validatebox"  name="task_name"  data-options="validType:'maxLength[20]',required:true" />
			    </td>
	 
			   <td style="width:70px;" >任务类型：</td>
			    <td style="width:150px;">
				<select name="task_type"  style="width: 150px;"  </select>
			    </td>
		     </tr>
		     <tr>
		      <td style="width:70px;" >负责人：</td>
			  <td style="width:150px;">
			   <select  name="manager_id"  ></select>
			    </td>
	  			<td style="width:70px;" >计划完成时间点：</td>
			    <td style="width:150px;">
				<input name="plan_finish_date"  class="easyui-datebox" style="width: 150px;" editable="false"   required="true"></input>
			    </td>
			  
		     </tr>
		     <tr>
		     	<td style="width:70px;" >工作量 人工/日：</td>
			    <td style="width:150px;">    
				<input name="work_day" class="easyui-validatebox" data-options="required:true,validType:'maxLength[4]'"   />
			    </td>
			    <td style="width:70px;" >任务描述：</td>
			    <td style="width:150px;"  >
				<textarea name="task_desc" cols="20" rows="4" class="easyui-validatebox" 
				data-options="validType:'maxLength[500]'" required="true"   ></textarea>
			    </td>
			    
			 
      </table>
  </form>
 </div>  
  <%-- 任务表单--%>
  
  <%-- 文档表单 --%>
   <div id="d2" style="display: none;overflow: hidden;">
		<form id="f2" method="post">
		 <input name="doc_id" type="hidden" />
		 <input name="ref_object" type="hidden"  />
		 <input name="ref_id" type="hidden"  />
		 <input name="data" type="hidden" />
		 <table class="tableForm">
		    <tr>
			    <td style="width:70px;" >文档类型：</td>
			    <td style="width:150px;"  >
				<select name="doc_type"  style="width: 150px;"   ></select>
			    </td>
			    <td style="width:70px;" >维护人：</td>
			    <td style="width:150px;">
				<select name="doc_maintain"  style="width: 200px;" class="easyui-combogrid"  
                    			 data-options="idField:'user_name',
												textField:'user_name',
												required:true,
												editable:false,
												url:'<%=ctx%>/sys/paramGroup/getParamGrid.htm?info=UGxosPAiph',
												columns:[[
													{field:'ur_id',title:'ID',width:60,hidden : true},
													{field:'user_name',title:'名称',width:80},
													{field:'role_name',title:'角色',width:80}
													
												]]">
               	</select>
			    </td>
			    <tr>
		     </tr>
			   <td style="width:70px;" >文档描述：</td>
			    <td style="width:150px;">    
				<textarea name="doc_desc" cols="20" rows="4" class="easyui-validatebox" 
				data-options="validType:'maxLength[500]'" required="true"   ></textarea>
			    </td>
			     <td style="width:70px;" >文档路径：</td>
			    <td style="width:150px;">    
			    <textarea name="doc_path" cols="20" rows="4" class="easyui-validatebox"  data-options="validType:'maxLength[500]'" required="true"   ></textarea>
			    </td>
		     </tr>
      </table>
  </form>
 </div>  
  <%-- 文档表单 --%>
  
  <%--会议表单 --%>
	 <div id="d3" style="display: none;overflow: hidden;">
		<form id="f3" method="post">
		 <input name="meeting_id" type="hidden" />
		  <input name="contact_id" type="hidden" />
		 <input name="data" type="hidden" />
		 <table class="tableForm">
		     <tr>
 
			   <td style="width:70px;" >会议名称：</td>
			    <td style="width:150px;">    
				<input name="meeting_name" class="easyui-validatebox" required="true"/>
			    </td>
			   <td style="width:70px;" >会议类型：</td>
			    <td style="width:150px;">  
			    <select name="meeting_type"  style="width: 150px;" class="easyui-combobox"  
                    			 data-options="editable:false,
                    			 			   required:true,
                    			 			   valueField:'code',
                    			 			   textField:'code_desc',
                    			 			   url:'<%=request.getContextPath()%>/sys/paramGroup/getParam.htm?info=OS4cqbVroP&info=d_meeting&info=meeting_type'">
             	</select> 
			    </td>
		     </tr>
		     <tr>
	 
			   <td style="width:70px;" >会议时间：</td>
			    <td style="width:150px;" colspan="3">    
				<input name="meeting_date"  class="easyui-datebox"  required="true"/>
			    </td>
	 
			   
		     </tr>
		     <tr>
		     <td style="width:70px;" >参会人员：</td>
			    <td style="width:150px;">
				<textarea name="meeting_person" cols="20" rows="4" class="easyui-validatebox" required="true"  ></textarea>
			    </td>
			   <td style="width:70px;" >会议描述：</td>
			    <td style="width:150px;"> 
				<textarea name="meeting_desc" cols="20" rows="4" class="easyui-validatebox" required="true"   ></textarea>
			    </td>
		     </tr>
      </table>
  </form>
 </div>  
	<%--会议表单 --%>
	
<%-- 文档表单 --%>
    <div id="d4" style="display: none;overflow: hidden;">
		<form id="f4" method="post">
		 <input name="doc_id" type="hidden" />
		 <input name="ref_object" type="hidden"  />
		 <input name="ref_id" type="hidden"  />
		 <input name="data" type="hidden" />
		 <table class="tableForm">
		     <tr>
			    <td style="width:70px;" >文档类型：</td>
			    <td style="width:150px;"  >
				<select name="doc_type"  style="width: 150px;"   ></select>
			    </td>
			    <td style="width:70px;" >维护人：</td>
			    <td style="width:150px;">
				<select name="doc_maintain"  style="width: 200px;" class="easyui-combogrid"  
                    			 data-options="idField:'user_name',
												textField:'user_name',
												required:true,
												editable:false,
												url:'<%=ctx%>/sys/paramGroup/getParamGrid.htm?info=UGxosPAiph',
												columns:[[
													{field:'ur_id',title:'ID',width:60,hidden : true},
													{field:'user_name',title:'名称',width:80},
													{field:'role_name',title:'角色',width:80}
													
												]]">
               	</select>
			    </td>
			    <tr>
		     </tr>
			   <td style="width:70px;" >文档描述：</td>
			    <td style="width:150px;">    
				<textarea name="doc_desc" cols="20" rows="4" class="easyui-validatebox" 
				data-options="validType:'maxLength[500]'" required="true"   ></textarea>
			    </td>
			     <td style="width:70px;" >文档路径：</td>
			    <td style="width:150px;">    
			    <textarea name="doc_path" cols="20" rows="4" class="easyui-validatebox"  data-options="validType:'maxLength[500]'" required="true"   ></textarea>
			    </td>
		     </tr>
      </table>
  </form>
 </div>  
 <%-- 文档表单 --%>
</body>
</html>